#! /usr/bin/env python
# -*- coding: utf-8 -*-

# *************************************************************
# Filename @ tooltips.py
# Author @ Huoty
# Create date @ 2014-10-17 08:31:16
# Description @ 
# *************************************************************

import gtk

class PyApp(gtk.Window):
    def __init__(self):
        super(PyApp, self).__init__()

        self.set_title("Tooltips")  # 设置标题
        self.set_size_request(250, 200)  # 设置尺寸
        self.set_position(gtk.WIN_POS_CENTER)  # 设置位置

        self.connect("destroy", gtk.main_quit)

        self.fixed = gtk.Fixed()
        self.add(self.fixed)
        
        button = gtk.Button("Button")
        button.set_size_request(80, 35)

        self.fixed.put(button, 50, 50)

        self.set_tooltip_text("Window widget")
        button.set_tooltip_text("button widget")

        self.show_all()

# Script starts from here

PyApp()
gtk.main()
